package tools;

import javax.swing.JOptionPane;
import javax.swing.JPasswordField;

public class PasswordDialog {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JPasswordField passwordField = new JPasswordField(10);
		passwordField.setEchoChar('#');
		JOptionPane.showMessageDialog(null, passwordField, "Enter password",
				JOptionPane.OK_OPTION);
		System.out.println(passwordField.getPassword());
	}
}